<meta title="新增秒杀商品" args="item" width="700px"/>
<form class="p" s="form,nda,datac,valid" s-data="item" id="form" method="post" action="/api/seckillItem">
    <table class="table table-bordered table-stripped">
        <tr>
            <td style="width: 100px;">宝贝图片：</td>
            <td s="tpl">
                {%$.each(this.imgList, function() {%}
                <img src="{%=this%}" style="width: 60px;height: 60px; float: left; margin-right: 5px; margin-bottom: 5px;" />
                {%})%}
                <input autocomplete="off" type="hidden" name="picUrl" value="{%=this.imgList[0]%}" />
                <input autocomplete="off" type="hidden" name="imgs" value="{%=this.imgList.join(',')%}" />
                <input autocomplete="off" type="hidden" name="ecomPlatform" value="{%=this.ecomPlatform%}" />
                <input autocomplete="off" type="hidden" name="itemUrl" value="{%=this.itemUrl%}" />
            </td>
        </tr>
        <tr>
            <td style="width: 100px;">宝贝名：</td>
            <td>
                <input autocomplete="off" type="text" name="title" s-valid-error="require()" class="form-control" />
            </td>
        </tr>
        <tr>
            <td style="width: 100px;">分类：</td>
            <td>
                <select class="form-control" name="catId" s-build="S.get('/api/shopcat/list/0')" s="select">

                </select>
            </td>
        </tr>
        <tr>
            <td style="width: 100px;">搜索关键字：</td>
            <td>
                <input autocomplete="off" type="text" name="keyword" class="form-control" s-valid-error="require()"/>
            </td>
        </tr>
        <tr>
            <td style="width: 100px;">卖家：</td>
            <td>
                <input autocomplete="off" type="text" name="sellerName" class="form-control" s-valid-error="require()"/>
            </td>
        </tr>
        <tr>
            <td style="width: 100px;">发货地：</td>
            <td>
                <input autocomplete="off" type="text" name="location" class="form-control" s-valid-error="require()"/>
            </td>
        </tr>
        <tr>
            <td style="width: 100px;">原售价：</td>
            <td>
                <input autocomplete="off" type="text" name="salePrice" s-valid-error="require(),number(),min(0)" class="form-control" />
            </td>
        </tr>
        <tr>
            <td style="width: 100px;">返现金额：</td>
            <td>
                <input autocomplete="off" type="text" name="fanliAmount" s-valid-error="require(),number(),min(0)" class="form-control" />
                <div class="text-muted p-t-sm">如果返现金额不填写或者为0，返现金额默认为原售价金额</div>
            </td>
        </tr>
        <tr>
            <td style="width: 100px;">数量：</td>
            <td>
                <input autocomplete="off" type="text" name="totalCount" s-valid-error="require(),number(),min(1)" class="form-control" placeholder="输入商品的数量"/>
            </td>
        </tr>
        <tr>
            <td style="width: 100px;">开始日期：</td>
            <td>
                <input autocomplete="off" type="text" name="startTime" s-valid-error="require()" class="form-control" s="datetimepicker"/>
            </td>
        </tr>
        <tr>
            <td style="width: 100px;">推广天数：</td>
            <td>
                <input autocomplete="off" type="text" name="continueDays" s-valid-error="require(),number(),min(1)" class="form-control" />
            </td>
        </tr>
    </table>
</form>
<script>
    S.meta.btns = [
        {
            name: "保存",
            style: "btn btn-primary",
            click: function() {
                return $form.submit().done(function(rs) {
                    S.close(rs);
                })
            }
        },
        {
            name: "取消",
            style: "btn btn-default",
            click: function() {
                S.close();
            }
        }
    ]
</script>